﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using esri.ParaSeting;

namespace esri
{
    public partial class Form4 : Form
    {
        public Form4()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Paraseting PS = Paraseting.Instance();
            //修改
            PS.MaxSpeed = Convert.ToDouble(textBox5.Text) / 3.6;
            PS.MinSpeed = Convert.ToDouble(textBox6.Text) / 3.6;
            PS.RollDirection = Convert.ToDouble(textBox4.Text);
            PS.RollTimes = Convert.ToDouble(textBox2.Text);
            PS.RollWidth = Convert.ToDouble(textBox7.Text);
            PS.AngleError = Convert.ToDouble(textBox3.Text);

            this.Close();
        }

        public void Initialize()
        {
            Paraseting PS = Paraseting.Instance();
            textBox5.Text = (PS.MaxSpeed * 3.6).ToString();
            textBox3.Text = PS.AngleError.ToString();
            textBox4.Text = PS.RollDirection.ToString();
            textBox6.Text = (PS.MinSpeed * 3.6).ToString();
            textBox2.Text = PS.RollTimes.ToString();
            textBox7.Text = PS.RollWidth.ToString();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
